package cn.edu.dlmu.cogo.framework.data;

import cn.edu.dlmu.cogo.framework.annotation.Priority;
import cn.edu.dlmu.cogo.framework.config.DataBaseConfig;
import cn.edu.dlmu.cogo.framework.config.JavaConfig;
import cn.edu.dlmu.cogo.framework.context.ApplicationContext;
import cn.edu.dlmu.cogo.framework.context.ApplicationContextAware;
import cn.edu.dlmu.cogo.framework.context.Level;

/**
 * @author yixi
 */
@Priority(Level.Middle)
public class DataBaseAware implements ApplicationContextAware {

    @Override
    public void setApplicationContext(ApplicationContext applicationContext) {
        //设置默认数据库配置对象
        JavaConfig.setConfig(new DataBaseConfig());
    }
}
